package com.ace.log.core.file.clean

import java.io.File


class FileLastModifiedCleanStrategy(private val maxTimeMillis: Long) : ICleanStrategy {

    override fun shouldClean(file: File): Boolean {

        val currentTimeMillis = System.currentTimeMillis()
        val lastModified = file.lastModified()
        return currentTimeMillis - lastModified > maxTimeMillis
    }
}